import { useState } from 'react';

function ButtonCounter(props) {
    const [counter, setCounter] = useState(0);

    return (
        <div>
            <button onClick={() => {setCounter(counter => counter + 1)}}>{props.text}{counter}</button>
        </div>
    )
}

export default ButtonCounter